{extends 'base/site2.html'}
{block name="page_header"}{include file="common/header.html" inline}{/block}
{block name="page_nav"}{include file="common/slide-nav.html" inline}{/block}
{block name="page_styles"}
    <link rel="stylesheet" type="text/css" href="/css/common/daterangepicker-bs3.css" />
    <link rel="stylesheet" type="text/css" href="/css/mediation/caseallocate/index.css" />
<style>
.modal.in .modal-dialog{
    transform: translate(0,50%)!important;
}
</style>
{/block}
{block name="page_section"}
<div class="clearfix">
	<div class="sessionPage">
        <div class="page-header">
          <div class="left">
            <span class="line"></span>
            <strong class="tit">导出任务</strong>
          </div>
        </div>
        <form class="small-style" method="get" action="" role="validform" enctype="multipart/form-data">
          <div class="form_row">
            <input type="hidden" name="is_show" class="showmoreishow" value="{if $is_show == 1}1{else}0{/if}">
            <input type="hidden" name="limit" value="{if $query.limit}{$query.limit}{/if}">
            <div class="form-group col-lg-3 ui-select">
                <label for="exampleInputName2"  class="col-sm-4 control-label">提交人:</label>
                <div class="col-sm-7">
                    <select class="form-control selectpicker"   title="请选择" name="mediatorId" id="mediatorId">
                        {foreach from=$mediator  item=info}
                        <option class="u144_input_option" {if !empty($query.mediatorId) &&  $info.id == $query.mediatorId}selected="selected"{/if} value="{$info.id}">{$info.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="form-group col-lg-3 ui-select">
                <label for="exampleInputName2"  class="col-sm-4 control-label">完成状态:</label>
                <div class="col-sm-7">
                    <select class="form-control selectpicker"   title="请选择" name="exportStatus" id="exportStatus">
                        <option class="u144_input_option" {if !empty($query.exportStatus) &&  1 == $query.exportStatus}selected="selected"{/if} value="1">待生成</option>
                        <option class="u144_input_option" {if !empty($query.exportStatus) &&  2 == $query.exportStatus}selected="selected"{/if} value="2">已完成</option>
                    </select>
                </div>
            </div>
            <div class="form-group col-lg-3 ui-select">
                <div class="col-lg-4" style="float: right;">
                    <button class="btn btn-primary col-lg-8 shousuoBtn "><span class="nav-icon glyphicon glyphicon-search" aria-hidden="true" style="margin-right: 2px"></span>查询</button>
                </div>
                <div class="col-lg-4">
                    <a type="button" href="/export/index" class="btn btn-default col-lg-8 "><span class="nav-icon glyphicon glyphicon-refresh" aria-hidden="true" style="margin-right: 2px"></span>重置</a>
                </div>
            </div>
          </div>
        </form>
        <div style="width: 95%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        overflow-x: scroll;">
            <table class=" table table-striped table-bordered table-hover text-nowrap" id="tab">
                <thead>
                    <tr>
                        <th scope="col">导出id</th>
                        <th scope="col">导出类型</th>
                        <th scope="col">提交人</th>
                        <th scope="col">提交时间</th>
                        <th scope="col">耗时</th>
                        <th scope="col">状态</th>
                        <th scope="col" class="fix-ele">操作</th>
                    </tr>
                </thead>
                <tbody>
                {if $arrList}
                {foreach from=$arrList key=key item=item}
                <tr>
                    <td>{$item['id']}</td>
                    <td>
                        {if $item.exportType == 1}
                        调解记录
                        {else if $item.exportType == 2}
                        调解录音
                        {else if $item.exportType == 3}
                        通话记录
                        {else}
                        短信记录
                        {/if}
                    </td>
                    <td>{$item['addTime']|date_format:"%Y-%m-%d %H:%M:%S"}</td>
                    <td>{$item['mediatorName']}</td>

                    <td>{if $item['useTime']}{$item['useTime']}秒{else}--{/if}</td>
                    <td>
                        {if $item.exportStatus == 1}
                        待生成
                        {else if $item.exportStatus == 2}
                        已完成
                        {else if $item.exportStatus == 3}
                        已过期
                        {else if $item.exportStatus == 4}
                        无数据
                        {/if}
                    </td>
                    <td class="fix-ele">
                        {if $item.path && $item.exportStatus == 2}
                        <a class="delentry" href="{$item.path}" >下载</a>

                        {else}
                        <font color="#8c8c8c">下载</font>

                        {/if}
                    </td>
                </tr>
                {/foreach}
                {/if}
                </tbody>
            </table>
        </div>

        <input type="hidden" value="" id="allocate_type">
        <input type="hidden" value="" id="allocate_ids">

        <div class="clearfix pad-no text-nowrap" style="margin-top: 20px;">
            {include file="base/pagenav.html"  action="/export/index" pagenum=$curPageNum inline}
            <span style="float:right;">共 {$totalnum} 条</span>
        </div>
    </div>

{/block}